home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: ramanujn.unx.sas.com!sasrag
- From: sasrag@ramanujn.unx.sas.com (Russell Gonsalves)
- Subject: Rogue Wave bug? / How buggy is Rogue Wave?
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <DKo7KB.6KL@unx.sas.com>
- Date: Thu, 4 Jan 1996 19:02:35 GMT
- X-Nntp-Posting-Host: ramanujn.unx.sas.com
- Organization: SAS Institute Inc.
-
- /*
-
- Here's the program to try:
-
- The bug?
-
- It seems to badly handle null-strings. The last
- print still prints yy. While test.isNull() is
- aware that the string is a null-terminated string,
- such a RWCString cast to const char * does not
- point to "". This appears to defeat the otherwise
- seamless and elegant conversion between RWCStrings
- and character pointers.
-
- If you have RW could you try this out, and tell
- me if your version produces similar results.
-
- What are your experiences with this library. We've
- just started to use it, and quite frankly I'm a
- little surprised by this bug.
-
- */
-
-
- #include <iostream.h>
- #include <rw/cstring.h>
-
- static void print(const char * p)
- {
- cout << "String:\"" << p << "\"" << endl;
- }
-
- main()
- {
- RWCString test;
-
- test = "abc";
- print(test);
- test = "xyz";
- print(test);
- test = "yy";
- print(test);
- test = "";
- print(test);
- }
-
-
-
-
-
-
-
-
- --
-
-
- Russell Gonsalves sasrag@unx.sas.com
- IDE Department, +1 919 6778000 x7702
- R2280, SAS Institute, Cary, NC 27513 USA
-